Skip to content

Extension hooks and skeleton of phongo #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 19, 2014
Merged

Extension hooks and skeleton of phongo #4

merged 8 commits into from
Jun 19, 2014

Conversation

bjori
Copy link
Contributor

@bjori bjori commented Jun 18, 2014

No description provided.


PHP_FUNCTION(bson_encode);
PHP_FUNCTION(bson_decode);
PHP_FUNCTION(bson_to_json);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a json_to_bson() function, too? Or rather, bson_encode_json and bson_decode_json.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Don't think libmongoc supports that - and you can do it in userland anyway: bson_encode(json_decode($json));.

I'm unsure what the usecase for this is would be.

bson_to_json() is handy to debug stuffz...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be for supported extended JSON. I believe Christian actually has methods for this, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. from Extended JSON... I guess that makes sense.
Could also help mocking up bson I suppose


static zend_function_entry php_phongo_cursor_me[] = {
/**
* Returns the CursorId
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

bjori added a commit that referenced this pull request Jun 19, 2014
Extension hooks and skeleton of phongo
@bjori bjori merged commit e0f13cc into master Jun 19, 2014
@bjori bjori changed the title Extension hooks and skeleton of phongo, and basic bson implementation Extension hooks and skeleton of phongo Jun 19, 2014
@bjori bjori deleted the c-skeleton branch November 24, 2014 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants